package com.school.repair.service;

import com.school.repair.dao.BaoXiuManDao;
import com.school.repair.entity.BaoXiuMan;
import com.school.repair.util.Page;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;
@Service
public class BaoXiuManService {

    @Resource
    BaoXiuManDao baoXiuManDao;
    public Page<BaoXiuMan> baoxiumanList(long id, int pageNo, int pageSize, String cname, String name, String openid, String tel) {
            List<BaoXiuMan> list = baoXiuManDao.baoxiumanList(id, pageNo, pageSize, cname, name, openid, tel);
            int total = baoXiuManDao.total(id, cname, name, openid, tel);
            return new Page<BaoXiuMan>(total, list, pageNo);
    }

    public BaoXiuMan baoXiuManSearchById(long id) {
            return baoXiuManDao.baoXiuManSearchById(id);
    }

    public int baoXiuManUpdate(BaoXiuMan bxm) {
            return baoXiuManDao.baoXiuManUpdate(bxm);
    }

    public int baoXiuManUpdatePassById(long id, String pass) {
            return baoXiuManDao.baoXiuManUpdatePassById(id, pass);
    }

    public int delBaoXiuMan(long id) {
            return baoXiuManDao.delBaoXiuMan(id);
    }

    public int unitAddBaoXiuMan(BaoXiuMan bxm) {
            return baoXiuManDao.unitAddBaoXiuMan(bxm);
    }

    public List<BaoXiuMan> findBaoXiuMan(long bxm) {
            return baoXiuManDao.findBaoXiuMan(bxm);
    }

    public BaoXiuMan login(String name, String pass) {
            return baoXiuManDao.login(name, pass);
    }
}
